Non-standard type inference for functional programs

نویسندگان

  • Ferruccio Damiani
  • Paola Giannini
چکیده

We propose a general framework for “non-standard type inference based” static analyses of typed functional programs and study inference systems (with and without conjunction) for strictness, totality, and dead-code analyses. A key feature of our framework is that it provides a foundation of the program analyses which is based directly on the operational semantics of the programming language considered. This results in a rather direct presentation which involves relatively little mathematical overhead. We develop a semantical investigation of the systems and discuss in some detail possible implementations of the presented analyses. In particular we give sound and complete inference algorithms for strictness and dead-code analyses without conjunction.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Confluence for Non-Full Functional Dependencies

Previous work on type inference for functional dependencies demands that the dependency must fully cover all parameters of a type class to guarantee that the constraint solver is confluent. However, several interesting programs rely on non-full functional dependencies. For these, the underlying constraint is nonconfluent, and hence type inference for these programs is possibly ill-behaved. We i...

متن کامل

Type Inference of Turbo Pascal

Type inference is generally thought of as being an exclusive property of the functional programming paradigm. We argue that such a feature may be of significant benefit for also standard imperative languages. We present a working tool (available by WWW) providing these benefits for a full version of Turbo Pascal. It has the form of a preprocessor that analyzes programs in which the type annotat...

متن کامل

Collected Size Semantics for Functional Programs over Lists

This work introduces collected size semantics of strict functional programs over lists. The collected size semantics of a function definition is a multivalued size function that collects the dependencies between every possible output size and the corresponding input sizes. Such functions annotate standard types and are defined by conditional rewriting rules generated during type inference. We f...

متن کامل

Amortized Resource Analysis with Polynomial Potential A Static Inference of Polynomial Bounds for Functional Programs (Extended Version)

In 2003, Hofmann and Jost introduced a type system that uses a potential-based amortized analysis to infer bounds on the resource consumption of (first-order) functional programs. This analysis has been successfully applied to many standard algorithms but is limited to bounds that are linear in the size of the input. Here we extend this system to polynomial resource bounds. An automatic amortiz...

متن کامل

Amortized Resource Analysis with Polynomial Potential A Static Inference of Polynomial Bounds for Functional Programs

In 2003, Hofmann and Jost introduced a type system that uses a potential-based amortized analysis to infer bounds on the resource consumption of (first-order) functional programs. This analysis has been successfully applied to many standard algorithms but is limited to bounds that are linear in the size of the input. Here we extend this system to polynomial resource bounds. An automatic amortiz...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003